<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>搜索框</title>
    <style>
        *{
            margin:0;
            padding:0;
        }
        body{
            background-color: #e94118;
        }
        .main{
            display: flex;
            flex-wrap: nowrap;
            justify-content: center;
            align-items: center;
            position: absolute;
            height: 40px;
            min-width: 40px;
            top:50%;
            left:50%;
            transform: translateX(-50%) translateY(-50%);
            background-color: black;
            border-radius: 40px;  
            padding: 5px; 
        }
        .searchvalue{
            line-height: 25px;
            width: 0;
            transition:1s;
            border:none;
            outline: none;
            border-radius: 10px;
            background-color: #000;
        }
        .main:hover .searchvalue{
            width: 200px;
            text-indent: 10px;
            background-color: #fff;
        }
        .searchbtn{
            box-sizing: border-box;
            display: inline-block;
            height: 36px;
            width: 36px;
            background: url('/api/imgs/19.png') no-repeat 3px 3px/25px 25px;
            background-size: 25px 25px;
            border-radius: 50%;
            border:2px solid #000;
        }
        .searchbtn:hover{
            cursor: pointer;
            background-color: wheat;
        }
    </style>
</head>
<body>
    <div class="main">
        <input type="text" class="searchvalue">
        <i class="searchbtn"></i>
    </div>
</body>
</html>